const mysql = require("mysql");

const db = mysql.createConnection({
  host: "localhost",
  user: "root",
  password: "root",
  database: "test",
});

db.connect((err) => {
  err ? console.log("数据库连接失败") : console.log("数据库连接成功");
});

module.exports = db;